Repository navigation
Publish reviewed NodeBB tags through GitHub-hosted npm OIDC - #1
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The public NodeBB package currently publishes as part of the protected private monorepo
full_releasepath, together with other platforms. Give NodeBB its own small npm release job that uses GitHub-hosted compute and npm trusted publishing (OIDC) instead of placing an npm credential in GitHub Actions or consuming the local CI dispatcher.Changes
.github/workflows/publish-npm.yml, pinned official Actions, hosted Ubuntu 24.04 / Node 24, no dependency cache, no uploaded build artifacts, no arbitrary workflow dispatch.package.json, reachable from publicmainand having the exact repository identity.npm ci --ignore-scripts, NodeBB lint, check/tests and a dry-run package build.npm publish --provenance(GitHub permissions restricted tocontents:readandid-token:write).The package itself and existing NodeBB runtime requirements remain unchanged (current
1.0.1, Node 22+). No existing tag is touched and this workflow does not publish until a later reviewed release tag is created.Rollout dependency
After merging but before the next release, the package administrator must register this trusted publisher in npm: organisation
Forum-Fortress, repositorynodebb, workflow filenamepublish-npm.yml, environment blank, and grant npm publish permission. Fresh npm trusted publisher configurations expire unless validated within two days, so perform that setting near the first new release.Keep the existing Control-held npm token initially. After this OIDC workflow has successfully published a real release, update the private
full_releasepath to stop independently republishing NodeBB and then retire the token.No unreviewed PR code can publish: only an annotated tag of public main, pushed by the existing protected source publisher, triggers this job.